<U:PRJVK x:Class="WPFExcelReport.TSTVK05"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls" 
                      xmlns:U="clr-namespace:WPFExcelReport;assembly=ITXUI"
                     xmlns:WG="clr-namespace:WPFExcelReport;assembly=TWGBST"
                    xmlns:WD="clr-namespace:WPFExcelReport;assembly=TWDECK" 
                    xmlns:WS="clr-namespace:WPFExcelReport;assembly=TWASTAMM" 
                    xmlns:KD="clr-namespace:WPFExcelReport;assembly=TKDSTAMM"  
                    xmlns:VP="clr-namespace:WPFExcelReport;assembly=TVVPACK"  
                    xmlns:VF="clr-namespace:WPFExcelReport;assembly=TVAFARBEN" 
                    xmlns:VKK="clr-namespace:WPFExcelReport;assembly=TVKKOPF" 
                    xmlns:VKP="clr-namespace:WPFExcelReport;assembly=TVKPOS" 
                    xmlns:ZB="clr-namespace:WPFExcelReport;assembly=TVKZUAB"   
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"   
                    xmlns:VR="clr-namespace:WPFExcelReport;assembly=TVRKOPF"  
                    xmlns:VRP="clr-namespace:WPFExcelReport;assembly=TVRPOS"
                    xmlns:VVT="clr-namespace:WPFExcelReport;assembly=TVVTLIEF"
                    xmlns:ZA="clr-namespace:WPFExcelReport;assembly=TZABED"  
                    xmlns:MAH="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"  
                    xmlns:me="clr-namespace:WPFExcelReport"
                    xmlns:TXT="clr-namespace:WPFExcelReport;assembly=TTXTIND"  
                    Name="TV"  
                    Loaded="Window_Loaded"
>
    <U:PRJVK.Resources>
        <ucd:BoolToVisibilityConverter x:Key="bv"/>
        <ucd:Divideby10000 x:Key="dw"/>
        <ucd:NOTBoolToVisibilityConverter x:Key="nbv"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:NOTConverter  x:Key="not"/>
    </U:PRJVK.Resources>
    <DockPanel>
        <ex:AniScrollViewer 
            DockPanel.Dock="Bottom"    
            Visibility="{Binding IsShowBottom,ElementName=TV,Converter={StaticResource bv}}">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="Auto"></RowDefinition>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <WS:TWASTAMM  Grid.Row="0" Grid.Column="0" Margin="10" 
                           IsAuto="True" 
                           ORDERNUM="{Binding PRART,ElementName=cVKP}"/>
                <ZB:TVAPR  Grid.Row="0" Grid.Column="1"
                           VKZAUF="{Binding VART,ElementName=cVKP}"/>
            </Grid>
        </ex:AniScrollViewer>
        <ex:AniScrollViewer DockPanel.Dock="Right" 
                    MaxWidth="400"
                    Visibility="{Binding IsShowRight,ElementName=TV,Converter={StaticResource bv}}" >
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="Auto"></RowDefinition>
                </Grid.RowDefinitions>
                <VRP:TVKKVR05 Grid.Row="1" 
                     VKK="{Binding AUF,ElementName=cVKP}" 
                   IsAuto="False"  />
                <VR:TVR04  Grid.Row="2" Name="cVRK" 
                        IsAuto="{Binding IsAutoVRK,ElementName=cVKK}"
                        VKK="{Binding AUF,ElementName=cVKK}"
                        KEY="{Binding RENR,ElementName=cVKK}" 
                        />

            </Grid>
        </ex:AniScrollViewer>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"></RowDefinition>
                <RowDefinition Height="1*"></RowDefinition>
            </Grid.RowDefinitions>
            <WrapPanel Grid.Row="0"  Visibility="{Binding KDBLOCK,ElementName=cKD,Converter={StaticResource bv}}">
                <TextBlock    Margin="5"
                              Foreground="Red"
                            Text="{Binding Source={Localization:Translate Word=KDCREDITEXC}}"
                       />
                <TextBlock   Margin="5"
                             Foreground="Red"
                            Text="{Binding VKBLOCK,ElementName=cKD}"
                       />
                <CheckBox Content="{Binding Source={Localization:Translate Word=关闭此提示}}"   Foreground="Red"
                            Margin="5,0,0,0"
                          IsChecked="{Binding KDBLOCK,ElementName=cKD,Converter={StaticResource not}}"/>

            </WrapPanel>
            <Grid Grid.Row="1" >
                <Grid.RowDefinitions>
                    <RowDefinition   Height="Auto" />
                    <RowDefinition   Height="1*" />
                    <RowDefinition   Height="Auto" />
                    <RowDefinition   Height="1*" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <VKK:TSTVK04 Name="cVKK"  Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
                         IsMTR="{Binding IsMTR,ElementName=cVKP}"
                         IsKG="{Binding IsKG,ElementName=cVKP}"
                         IsOrder="True"
                         IsCheckKD="True"
                         PRTYPE="TSTVK04"
                          KDBLOCK="{Binding KDBLOCK,ElementName=cKD}"   
                          IsCanDelete="{Binding IsCanDelete,ElementName=TV}" 
                          IsCanNew="{Binding IsCanNew,ElementName=TV}" 
                         IsCanChg="{Binding IsCanChg,ElementName=TV}"  
                         IsChgZA="{Binding IsChgZA,ElementName=TV}"
                          ScopeManage="{Binding ScopeManage,ElementName=TV}" 
                          ORDERNUM="{Binding VKAUF,ElementName=TV}" 
                      />
                <WD:TPWD02 Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
                       Visibility="Collapsed"
                       IsAuto="{Binding IsAutoEK,ElementName=cVKK}"
                       EKAUF="{Binding EKAUF,ElementName=cVKK}"
                       VKK="{Binding AUF,ElementName=cVKK}"/>
                <U:TSTVKPOS  Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"
                           KURS="{Binding KURS,ElementName=cVKK}"
                     Name="cVKP" 
                     ARTST="F" 
                     IsPrice="True"   
                     IsAuto="True" 
                            UMLMS="M;YD;YRD;"
                     IsCanDelete="{Binding IsCanDelete,ElementName=TV}" 
                     IsCanNew="{Binding IsCanNew,ElementName=TV}" 
                      IsCanChg="{Binding IsCanChg,ElementName=TV}" 
                     IsCanCopy="{Binding IsCanCopy,ElementName=TV}"  
                      BSTSTA="{Binding KDSTA,ElementName=cVKK}"      
                      WERT="{Binding WERT,ElementName=cVKK}"  
                      dwVKK="{Binding dwVKK,ElementName=cVKK}"  
                     IsEdit="{Binding IsEdit,ElementName=cVKK}" 
                     IsSaved="{Binding IsSaved,ElementName=cVKK}" 
                     MinWidth="200" MinHeight="50" />
                <TabControl Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2">
                    <TabItem Header="{Binding Source={Localization:Translate Word=品种信息}}" Name="ZoneArt">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="1*"/>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="1*"/>
                                <ColumnDefinition Width="1*"/>
                            </Grid.ColumnDefinitions>
                            <VF:TVA10 Name="cSVA10" Grid.Row="1" Grid.Column="0" 
                          ORDERNUM="{Binding VART,ElementName=cVKP}"
                          PRART="{Binding PRART,ElementName=cVKP}"/>
                            <TextBlock  Grid.Row="0" Grid.Column="1" Text="{Binding Source={Localization:Translate Word=备注}}"/>
                            <TXT:TXTITXBOX   Grid.Row="1" Grid.Column="1"
                                Name="cTxt" 
                                TART="VKT"
                                MinHeight="300"
                                IsAuto="False"
                                IsInfoOneLine="True"
                                IsTXTBox="True" 
                                IsEdit="{Binding IsEdit,ElementName=cVKP}"   
                                IsSaved="{Binding IsSaved,ElementName=cVKP}"   
                                SIND="{Binding TXTISIND,ElementName=cVKP}"   
                                DEFTXT="{Binding DEFTXT,ElementName=cVKP}"  
                                Width="Auto" HorizontalAlignment="Left"/>
                        </Grid>
                    </TabItem>
                    <TabItem Header="{Binding Source={Localization:Translate Word=附加费}}" Name="ZoneSurchage">
                        <ZB:TVKZUAB  Name="cZBP" 
                        Margin="10"
                        IsAuto="True"   
                        MaxHeight="300" 
                        VKZSA="VK"   
                       ORDERNUM="{Binding AUF,ElementName=cVKP}"  />
                    </TabItem>
                    <TabItem Header="{Binding Source={Localization:Translate Word=生产发货信息}}" Name="ZoneAB">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="1*"></ColumnDefinition>
                                <ColumnDefinition Width="1*"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <VVT:TVVTLIEF  Grid.Column="0"  Name="cVVT"  
                                 IsWBREQ="False"  
                                 IsAuto="False" 
                                 VKP="{Binding AUF,ElementName=cVKP}"
                               />
                            <StackPanel  Grid.Row="0" Grid.Column="1">
                                <WD:TWDECK  Name="cWD"   
                                    ORDERNUM="{Binding AUF,ElementName=cVKP}"
                                    IsOrder="True"
                                   />
                                <WG:TWGBST dwWD="{Binding dwWD,ElementName=cWD}"/>
                            </StackPanel>
                        </Grid>
                    </TabItem>
                    <TabItem Header="{Binding Source={Localization:Translate Word=客户信息}}" Name="ZoneKD">
                        <KD:TKD Grid.Row="0" Name="cKD"
                            ORDERNUM="{Binding KUNDNR,ElementName=cVKK}"   
                            />
                    </TabItem>
                    <TabItem Header="{Binding Source={Localization:Translate Word=发票信息}}" Name="ZoneInvoice">
                        <VRP:TVR05 Grid.Row="3" ARTST="F" Name="cVR05"
                          IsFilterByVKP="True"
                          MaxHeight="300"
                          IsAuto="False"
                         IsCanPay="False"
                           IsVVPay="False"
                           IsRest="False"
                           IsMPay="False"
                          RENR="{Binding KEY,ElementName=cVRK}"
                          dwZB="{Binding dwZB,ElementName=cZBP}"  
                          dwVKP="{Binding dwVKP,ElementName=cVKP}"  
                         />
                    </TabItem>
                </TabControl>
            </Grid>
        </Grid>
    </DockPanel>
</U:PRJVK>
    
